Fix for emacs shell mode to work with this configuration