fix buggy way of getting the id from the querystring