fixed further bugs in commands.py