Fixed path error and optimized runtime.