fix in logic