Fixing compiler errors and warnings on mac
Fixing compiler bug on Mac laptop