Fixing issue when there are multiple rows for the same term in language_pages table