Fixes mod 0 floating point exception