various timing/off-by-frame fixes