to avoid prosecution for bribery and fraud , he proceeded to discover a serious mishap at the lab : apparently two soil samples had gotten switched and he , as it turned out , had been analyzing the wrong sample all along .