Minor optimisation to key retrieval