Hugo Ernesto Castro, of San Jose, Calif., tried to turn himself in at a local precinct Monday, but was told to go elsewhere even after he confessed to the stabbing death of his ex-girlfriend and handed over a note revealing the location of her body, according to ABC 7 Chicago.

A deputy told Castro, 28, that he was in the wrong place, telling him to go to police headquarters, which he surprisingly did. Castro repeated the process he did before after he arrived at the HQ and, following his instruction, police found the body of Castro's ex-girlfriend at the address he gave, and arrested him.

In light of the incident, the sheriff's office is investigating why the deputy didn't follow standard procedure and detain Castro or at least take the extra precaution of escorting the homicide suspect to police headquarters, according to USA Today.

"Once they leave, who knows what's going to happen next," a retired San Francisco police captain told the San Jose Mercury News. "Maybe they go the two blocks and turn themselves in. Or maybe they have second thoughts, or go home and destroy evidence."

Castro is now being held at the same jail he tried to turn himself into at the start, and the deputy who turned him away has been reassigned.