fixing key-error