Fix bug #604 xcode crash
Merge pull request #605 from pebble8888/fix_crash

Fix bug #604 xcode crash