unpersisting matrices correctly