keys: fix logic error
up