Fixed auto-resize issue for default viewport

Fixes #23
Merge pull request #26 from rinold/master

Fixed auto-resize issue for default viewport