added better handling of custom packs(needs testing)