Fix waitfg loop and change handler messages