gedit 3.14 compatibility

Fixes #14 and another bug not reported.