A multi-configuration Hartree-Fock program with improved stability