[fix] almost all compilation errors