Bugfixes

Hopefully fixed error when loading and unloading plugin caused by race
condition
Fixed save