Bugfix for save event