Possible fix for  #8

Tries to match Endpoints more thorougly.