fixed mac compiler errors