remove excess nil's