fixing WTO error trapping bug