Fix test codes