Fixed bugs

Adding a snippet was sometimes in an incorrect snippet layout.
Adding a new snippet updated all topic counts, not just the current
topic