Added a line to update switch pressed state.