Cleanup.
Added sanity check for transient buffers.