bug fixed on empty data