Fixed a crash issue