bug fix for the Test mode