Try to improve and deal with older emacs 24 version