Fix bug detecting changes