attempt to fix recent segfaults