Added some bug fixes for ergoemacs-cua mode