Cleaning up stats query strings
Fixing bug with ids not being an array