Made beforeSave call compatible