fixed ra wraparound issue