expand wildcards properly