fix snippet file index when empty