fix leak, missing keystore deinitialization