Fix before_restart script