Fix automatic package download bug