fix sleep duration