bugfixes in save/load