Remove duplicates and fix the order for set_column

Closes #82.