Bugfixes to arithmetic, conversion, and core modules