UP-3702 Fix comparison bug