Bugfixes and persistence