fixes #142 and some cleaning in pane sizer