Fixed return value from key retrieval.