Fixed saving and added some mac changes.