Fix segfault on wallet unlock