Fix close automatically