Fixed error when resizing
Merge pull request #32 from vakata/patch-1

Fixed error when resizing