Upgrade resize event handler and hack indentation