Fixed `buffer-substring-no-properties' error with Emacs 24.4.50