Fix property undefined error when adding a treatment factor

Reviewer: Dan V.
Issue: N/A