Fixed duplicate close call