Changes for Mac support