Corrected the QueryProvider