fix glob expansion in corner cases