Added 'pid=' back into the javascript 'query' variable
The heartbeat methods need the 'pid' to figure out their location.