fixed a few small memory leaks relating to offset information.