mac compile fixes and folder resolving