fixed compatibility issue for Emacs version >22