devs: fix segfault when deleting models