Passing results to setCodeId bug fix