fix max turn bug