fix crash in appmine.js