Fix memory stream not returning end of stream properly
Switch to use buffer when copying stream