Fixed test result reporting issues and variable assignment problem.