Fixed duplicate topics on home page after query refactoring