Fixed bugs in QSDxxx routines, when using custom quantum number class without typedefing to Quantum