fixed few compile errors and doc build errors