Fixed closing issue with tasks & items