Fix comparision between variables of different type