fix for null exception

fixes issue when there is no download