Fix close while downloading error