Fix dynamic widget resizing.