Fixed 'select all' toggle to match state of the options

The 'Select All' checkbox will now become checked if all options are
selected or unchecked if not all are selected.