Fix a bug with multiple matching 

fixes #8