fix overflow in simulation