Corrected a bug with the Enter key