Make build work on Mac. Lots of error checking that caused segfault in unix env
Ortho view