Fixes to update method.

update_attributes wasn't actually working. It is now.
merge branches