changing before_restart