Fixed a bug about time cost