fixes pane not cleared bug

Minor bug fix