Resyncing HEAD with v_3_0_branch for two OSX fixes: