Make pylink more robust