Added error handling for the guesses.