Change location of clearing updateClientBounds to make sure OnResize is executed when client rectangle is changed.