fixed issues with capturing wildcards