fix deadlock in enter/leave events
add ID to the properties dialog box