fix for double comparison