Prevent out of range int values when converting from MOD