Fix segfault on release