fix unwanted free() calls - I hope the last time