Fixed the sleep method and user input.