changed overflow handling