Fixing required package detection