fixed a few timing problems