flow: fix bad overflowing math