Fixed a crash bug.