before_restart added