fix beforeCreate example