PL: Fixes (reverse-merged from commit 7c70f5d6423986d130ca93dc48fed96cc6d8f632)