fix toggle and update