fix bug in addKeyResult endpoint