In the following question, there is a sentence which is divided into four parts. Choose the fragment that carries an error (if any). Ignore punctuation errors if any.
He went on committing crime after crime / but in spite of my best efforts / I could not / prevent him to do so.
prevent him to do so
'to do so' should be replaced with 'from doing so'.