Fix overflow problem