Fixed width and heigth parameters bug
Fixed TypeError
Make the code shorter
Merge pull request #6 from mozillazg/patch-2

Fix default behaviour if no width/height provided