Bug fix when empty data