Fix:
   fix the problem when exit the reg window, the rect hidden.