Improve the grammaticallity of the given text.
Peter thought that he must do something quickly to avoid her from committing suicide.
Peter thought that he must do something quickly to prevent her from committing suicide.