fix panel resizing