In 1993, M. Fragoulopoulou applied the technique of Ransford and proved that if E and F are lmc algebras such that E is a Q-algebra, F is semisimple and advertibly complete, and (E, F) is a closed graph pair, then each surjective homomorphism phi : E -> F is continuous. Later on in 1996, it was shown by Akkar and Nacir that if E and F are both LFQ-algebras and F is semisimple then evey surjective homomorphism phi : E -> F is continuous. In this work we extend the above results by removing the lmc property from E. We first show that in a topological algebra, the upper semicontinuity of the spectrum function, the upper semicontinuity of the spectral radius function, the continuity of the spectral radius function at zero, and being a Q-algebra, are all equivalent. Then it is shown that if A is a topological Q-algebra and B is an lmc semisimple algebra which is advertibly complete, then every surjective homomorphism T : A -> B has a closed graph. In particular, if A is a Q-algebra with a complete metrizable topology, and B is a semisimple Frechet algebra, then every surjective homomorphism T : A -> B is automatically continuous.