fixing extension based matching