Avoid null exception on startup
Properly set editFunction when saving. Fixes #5.