Added pthread patch