Add upgrade hook
Cleanup fix