Fixed a bug when renaming with the ENTER key

Resolves #53