fix wrap around