There's a man going on 6 years in jail,not prison, on an alleged double murder charge. He's gone through at least two mistrial's, and is facing a third trial this year.
Innocent people don't spend years in jail because a judge doesn't agree they can bail themselves out.
You are guilty until a jury , or judge for bail,or in a bench trial, lets you go.
My sister was a paralegal. She use to tell people,if ever arrested do not sign anything! Ever!Not even when they take your personal property as you are booked. Nothing,ever!
Then you have a chance at justice. But only if you can afford a private good attorney.