Fixed bug where infinite streams would cause a crash