Fix bug in setindex.