fixed a few things inluding username and pid storage