possible bugfix for odd segfault