Added better detection of readable streams to wrap