fix hotswap bug