fixing turn flag