fix crash caused by O2 because of bad C initialization