Fixed problems in testing mode