fix bug in mcsolve where output states where not stored properly as a result of the resent flattening of vectors