Fixed warnings about implicit type conversions when compiling