Fix the way raw query result is obtained.