Fix typo in diff query, remove superfluous confusing debug lines