Fix to some package loading issues