fix calculate turn