Added automatic sort to tasks based on weight