Small tweak to prevent java segfault