fix unload and reload behaviour while updating