Catch error if keys are wrong