bug fix for when there is no data