Added duplicate task prevention