Placed the rsleep call at the correct place.