fix custom order type funcs