Quick fix to repair segfault