fixed bug with incorrect assignment of time.Duration for sleep