Fixed bug in directoryStream