[BUGFIX] Fixed segfault