Fixed wrong comparison between old and new values before saving.