bug fix: update to method addAttachmentToTask

small bug fix on array key