fix potential bugs due to non-contiguous memory
add UHF-MCSCF