Fixed upper limit on number of viewpoints.
Fixed build.