Fixed timer of sleep functions