fixed bug in HasChanged