fix crash on reinstall