fixed bug where global format object was being updated on every window.onresize