Fixed the task displayed condition