Fix bug where sleep queue is not cleared