Update to take account of wraparound