Finally fix pidfile problems