Fix viewportPosition attributes access (closes #758)