fixing package restore bug