fix: segfault on quit