Fixed resizeHandler