fix reports query