remove trailing spaces. Fix facet_uri method