Add some fixes after Mac compilation