fixing bugs in commands