fix broken event handling for table collapsing