Correctly check for finished stream.