can't figure out why the pid is dying.. :/