Fixed #2. Renamed proc turn to completeturn.