fix bug with removing objects, add triggers