Fix bug when creating packages