fix warnings. sleep is not working