Fixed error on resize
Merge pull request #9 from msavazzi/master

fixed error on resize