check canonical id instead of relying on passed id
Merge pull request #138 from Yelp/bugfix_bad_comp

check canonical id instead of relying on passed id