Horrible crap to make MBNDM sort of work.