Wait for unit to stop instead of sleeping