Fixed warnings. Fixed 32/64 conversions