fixed wrap around problem when moving from 0 to environmentSize (going from right to left)