Fix bug of early disposal