Fix sleep duration