Fixed issue with patterns not matching properly.