Fix pthread