fix logic for single topic pages