Fix old style AR query.