Make the .pls parsing more robust.