Fix math and update timming