fixed compare fns