small amendment to type matching