Revert memory leak changes, causing issues with lsbfirst etc