Fix problem that crashes pinentry