cleanup, added default values for empty spans