Fix a bug related to running task