Fix error message when key is not found