Made a few small hacks to get it to work with my proxy code better