Fix task bug