The time-dependent density functional based tight-binding (TD-DFTB) approach is generalized to account for fractional occupations. In addition, an on-site correction leads to marked qualitative and quantitative improvements over the original method. Especially, the known failure of TD-DFTB for the description of sigma -> pi* and n -> pi* excitations is overcome. Benchmark calculations on a large set of organic molecules also indicate a better description of triplet states. The accuracy of the revised TD-DFTB method is found to be similar to first principles TD-DFT calculations at a highly reduced computational cost. As a side issue, we also discuss the generalization of the TD-DFTB method to spin-polarized systems. In contrast to an earlier study [Trani et al., JCTC 7 3304 (2011)], we obtain a formalism that is fully consistent with the use of local exchange-correlation functionals in the ground state DFTB method.