Updating mode attribute to be a string