Bug fix: Undefined pkey (Issue #607)