Fixed a crash bug that occurs with iPhone Simulator