Fixed bug if adding task on a differnt tab