Fix lastStream bug