Fixed the way Security and Jail terminate, will only be terminated once
using a count to check if the bag and body scan terminate for security
and that all security actors terminate for the jail.