Error quering check_id