Fixed double comparison problems