bug fix for bad dir/pkg mismatch