fixed random/drunk wraparound issue