fixed segfault bug - removed assert wrapper