add time delay to fix crash at first time compile