Fix crash when loading multiple textItem
Some work on win32 events