crash when no data available fixed