fixed to work when no streams/callbacks are provided