When the officers of justice act in the prevention of crime, other persons who by their command act in their aid are justified in so doing.