Not comparing correctly