Move closing div inside if block.

This was causing invalid markup when there were no topics.