Fixed _GET memory leaks

Not sure whether this is the best solution, but it seems to work fine.