Fixed debug test code