sparse arrays cleanup