fixed test code errors