convert matrices to double -- mpt bugfix