Silly integer division bug