fix errors with new emacs version