fixed memory timing bug