Mac Compilation fixes