Fixed a bug where the application used to end and kill still functioning workers