Update to 13.1.2 + some fixes to improve compatibility with versions >= ...

...13.9

Also all .tpl renamed to .pan