Fixes issue#75 with viewport error
Merge pull request #77 from ted0000/issue077

Fixes issue#75 with viewport error