pylint. Also fixing wrong order of operations in _name_changed funtions