End stream correctly