Some changes in misesmat to avoid having a duplicate F stored.