Updated dependency order and made sure object exists before pre_save