Fix crash in commands

How did this ever work?