Fixed bug when no data returned