Fix: Setting new property of object must be done only after all database
actions are ok (and if ok).