Merge "Revert "Fixed a bug where the panel could be too small in certain cases""