fixed flaky/failing endstream tests