Resolve a data loss issue

Please see http://youtrack.sk89q.com/issue/CMDBOOK-2425.