fixed integer division bug