Revert "Some changes to fix random restarts"

This reverts commit e4892524ae8aa536af752aed016b9428e34c02f8.