Fix pth bug