Fixed issue if cmd status hook is not set when command is executed.