fixed a bug in attach that set @pid as a string