change queue wait to sleep