BUG: Add cast to int to deal with tru division