bugfix from trunk 3.0 originally from Agnes on qstat
ATTENTION: tests still ongoing, commit might has to be reverted if tests fail.
DSG