fixed problems with progress handle
checking for empty datasets