fix bug when instance redefine after unmap