Restore events on topbar buttons after a render

Fixes an issue where the buttons on a topbar would lose their events after a render.