Reset canvas options after width/height changes. Added beforeRender hook.