Tried to fix some compatability with Emacs 23