Fixed viewport bug