solved severe timing glitches introduced in previous commit