Fix runtest code