Added error returns for SetField and SetIndex.