Fixing deprecated AR query style.