Fix nullpointerexception when using keyboard go button