fixing sleeps