Remove redundant calls to put.