Fix undefined variable
Seems like we can use sleep() after all