Fix flag watcher not working, fix error with gethandle