Fixed error in 'logChanges'