fix shutdown of previous version