Fixing compilation warnings, conversion logic.