Fixed the add tasks functionality