bug fixes
safty against running too many processes