Fixed not using pointer by reference
Query parameter is now overwritten