Fixing segfault in quit command