Fix name change when saving a function