Update commands.cpp

Fix bug with diff.