Fix compilation errors in some packages