clean up print code
null terminate bad commands, resolves #6