Fixes #68, as well as null issue in PMs