Fix keys and IDs.