[fix] Corrected the close behaviour.