Fixed some stuff in topic algo

asdf
Merge pull request #6 from Vandenn/master

Fixed some stuff in topic algo