fixed ref to INT and changed title to pid for saving in task table