Converted attribute setting to use update_attribute