closed #2305: fix a running time error