Use a finalize to stop pane rendering rather than a hack.