fixed NPE when saving changed owners (fixes #548)