Fix task run block issue