fixed crash on mac

Ignore-this: 1377a6c46286b7505cb393e29108881d

darcs-hash:20141108062201-c21fe-8e600148f6d3342e752836adf9fa2661506aee6b