fix random stuff for emacs24