trying to fix master's segfault