prevented resize width from going past pane