Changes from apple commit