Fixes #24 Pressing Enter in sub-state causes page to hang and become unusable