Bugfix in persistence layer