Fixed bug with type issue for pid