Fixed a possible bug for the toggle fields