Fixed apple specific issues