Fix test run and optimize run time