Improve wildcard handling