After undefine, set self.domain to None right away
Fix a bug where all Advanced fields were not reset after undefine event