MAC OS support fixes