Fix a startup crash bug under Mac OS X