In 1977 , he pleaded guilty to having unlawful sex with a minor , But fled the United States because he believed the judge was going to sentence him to more than the time he had already served in a California detention center .