fix problem of dispose