fixed bugs with stream feature