Fixed some type conversions that Windows didn't like