fixed segfault on invalid topic