Cleaning the messages given by the task_manager