Fix and improve (make compatible with the do task)