Fix issue when adding packages