Update frame size handling code