Fixed bug with setting the pid for extracts to wrong datatype