Fixed a bug where the check for ko would crash if KO is not included