and so they get her off and at the very end of the case after it's over he's talking with her and he figures out that she really did do it after all a uh after after he got after he got her off
He only learned that she was guilty after he had already gotten her off.