Fixed  error where variable $scope.activeTopic was used instead of topic parameter