We had a chicken die in or coop during the night, the next night none of the chickens would go in, they roosted in the trees. Waking up to a died chicken did not suit the hens at all. So I gathered them up in the evening and put them in coop and shut door. After spending the night in the coop they showed no fear of going back in the next night. We have gone through this a couple of times.