Minor bugfix potentially with nil cmd