turn logic fix