Added a better hasChanged method