fixed undefined offset 0 when fetch empty data