fixed typo and reformat code with Emacs