Fixed the segfault #24