Fixes for emacs run via the command line