fix bug on spaces dissapearing from leaf entities
update lab 1