Fixed clear to also clear changedEntities.