Fixing Stream's binary read and write.