nanosleep call fixed