updated code to fix rendering bug when adding new objects to model