Remove SQL backticks; fix a KeyError [close-11136970]