corrected bug related to flash memory wait states