fix some warnings; add pid to callbacks; fix argv making things broken