Fixed issue with panels being resized into negative values.