Fixing bug when datasource returns no data