add freeze_attributes argument, fix edit factor levels