changed handling for singeled matches, bug fixes