Fix typo in db query.