fixing a bug in documents index_by_tag controller action