workaround bug in GCC causing segfault