Fix viewport resize
Merge pull request #549 from raven02/master

Fix viewport resize