fixes #17: fix the bug that modified instance could not be piped as a writable stream