Updated forceAutoResize procedure.