Could you try to isolate it further, which would help to debug it more? I.e. in particular it would be interesting to see, if your custom mp approach would work with amp or swa in isolation, as this is often causing trouble, if you are not careful.