fixing key error