fix tests, streamhandler