MAL support fixes (still neds some more tests)