[MODIFY] fixup event handlers in popup