Fixed bug where a failed push would wipe out local changed flag