mod(a,b) always returns a positive number

fixes #257