corrected bug with the query parameters in endpoint callback