fixed double comparison