cherry pick 58963f5827986561597446d10dd431e8b3891088
quick fix
quick fix2
Merge branch 'master' into btas-tmp

Conflicts:
	src/math/matrix.cc
	src/math/zmatrix.cc
	src/wfn/rdm.cc