bug fix in testmode