make enter key detection more robust
clean