Overflow fixes