Fix bug in result key lookup.