fix bug of releasing connections under the normal situation