MANHASSET, N.Y. (WPIX) – A New York man is accused of pulling a gun on a 6-year-old who mistakenly delivered a Halloween goody bag to his porch, according to the Nassau County Police Department.

The 6-year-old boy and his sister were with their mother in the Long Island hamlet of Manhasset on Saturday evening when the two children got out of their car to drop off the bag at what they believed was a friend’s house, according to authorities.

The children left the bag on the porch after ringing the doorbell, police said, but soon realized they might have gotten the wrong address.

When the boy went back to get the bag, according to authorities, 43-year-old Michael Yifan Wen allegedly opened the door and pointed a gun at the child’s head.

Wen was charged with endangering the welfare of a child and menacing. He pleaded not guilty and was ordered back in court on Nov. 13.

State officials reminded parents that young children should always be out with adults when trick-or-treating. Families should only approach houses that have the lights on.