--- betterselect.module	2009-02-27 16:05:29.000000000 +0100
+++ betterselect_new.module	2009-08-22 17:58:00.000000000 +0200
@@ -85,6 +85,11 @@ function betterselect_elements() {
 function betterselect_process($element, $edit, $form_state, $complete_form) {
   if (isset($element['#multiple']) && $element['#multiple'] == TRUE && !(variable_get('betterselect_node_form_only', FALSE) == TRUE && $complete_form['#id'] != 'node-form')) {
 
+	// To handle deselection of checkboxes in exposed Views-filters we need this
+  	if ((substr($complete_form['#id'],0,18) == 'views-exposed-form') && isset($element['#value'][0])) {
+  		$element['#value'] = array();
+  	}
+
     // If we're dealing with taxonomy, fix the option titles.
     if (is_object($element['#options'][0])) {
       // Build new array of options in format that theme_checkboxes expects.
@@ -191,6 +196,12 @@ function betterselect_process($element, 
  * Implementation of hook_form_alter().
  */
 function betterselect_form_alter(&$form, $form_state, $form_id) {
+
+  // Add this to handle checkboxes in exposed Views-filters
+  if (substr($form['#id'],0,18) == 'views-exposed-form') {
+  	$form['#submit'][] = 'betterselect_views_filter_from_checkboxes';
+  }
+
   // Taxonomy stores its #options in a weird way; we need to move it back once we're done.
   if (($form['#id'] == 'node-form' && isset($form['taxonomy']))) {
     $form['#submit'][] = 'betterselect_taxonomy_from_checkboxes';
@@ -203,6 +214,26 @@ function betterselect_form_alter(&$form,
 }
 
 /**
+ * Additional submit handler for the views filter form.
+ */
+function betterselect_views_filter_from_checkboxes($form, &$form_state) {
+  	// Create an array which is correct!
+  	$new_tid = array();
+  	if (!array_key_exists(0, $form_state['values']['tid'])) {
+  		foreach ($form_state['values']['tid'] as $val) {
+  			if($val != 0) {
+  				$new_tid[$val] = $val;
+  			}
+  		}
+  		// This is for the of chance that we actually selected something ;)
+  		form_set_value($form['tid'], $new_tid, $form_state);
+  		$form_state['values']['tid'] = $new_tid;
+  		$form_state[view]->filter[tid]->validated_exposed_input = $new_tid;
+  	}
+
+}
+
+/**
  * Additional submit handler for the taxonomy term form.
  */
 function betterselect_taxonomy_form_term_from_checkboxes($form, &$form_state) {
