sql fix for taxonomy join