Properly detecting change events