Fixed bugs in diff command