fixes overflows