Fixed errors in emacs