fixed int division 'bug'