Fixed an issue with Enemy and Worker where the threads do not shutdown