stream lib fixes