Fix and clear units creation