fixed library issues and compilation issues