You should avoid using `sleep` wherever possible. Try replacing this with a wait instead.