fixed bug in setAsChanged