fixing logics