Fix panel resizing