Fix error

Fix error when no pid exists.
looking for a better way of starting the processes.