Fixes in matrix import / export.