Made handling of non-running processes better.