Fixed viewport overwriting (fix #62)