Fix setStreamHandler and addStreamHandler methods.