BUG: Fixed incorrect type in integer conversion in to_stata

Simple fix for bug #6327. All conversions were off by a factor of 2.
Added test for this case.