Fixed the crash issue when the file is received