wrap around bug fixed