Added fix to prevent invalid input from making it past the InputProcessor and failing later.