working around a weird segfault