Fixing several compilation issues (warnings)