fix the crash issue