fix for #16 - wrong integer division