fix a bug on entering a line break