Manually resizing the frames caused bad performance