Debug - fixed a lot of timing issues