fix query for backends