Fix crash issue