fix mac compile errors