Fixing warnings and compilation error.