SmartActiveRecord checkIfAttributeChanged method bug fix