Fixing issue with instances and octrees