fixed some bugs and behavior regard the creation of new objects