Modified to revert port position which buffering forwarded more than it need during port closing.
Added reading data descriptor.