Mpl fix

The PR #44 needs to be merged first. This PR fixes #45.