logic corrections