 					_computed_date_pair.start_date := NULL;
 					_computed_date_pair.end_date := NULL;
 					_computed_date_pair.bit_mask := NULL;
-					_computed_date_pair.mask_length := 0;	
+					_computed_date_pair.mask_length := 0;
 				ELSE
 					IF previous_bounds.start_date IS NULL THEN
 						_computed_date_pair.start_date := NULL;
 						_computed_date_pair.end_date := NULL;
 						_computed_date_pair.bit_mask := NULL;
-						_computed_date_pair.mask_length := 0;	
-					ELSE						
+						_computed_date_pair.mask_length := 0;
+					ELSE
 						IF _start_date < previous_bounds.start_date THEN
 							_effective_start_bitmask_date := previous_bounds.start_date;
 							_start_bitmask_date := _start_date;

    $$ LANGUAGE 'plpgsql';
COMMENT ON FUNCTION stopisaccessible(_stop_id integer, _accessibility_mode_id integer, _date date) IS 'Return true if _stop_id is accessible at the date';

CREATE OR REPLACE FUNCTION purge_fh_data(_line_version_id integer) RETURNS VOID 
    AS $$
    DECLARE
        _route_stop_id integer;

						_computed_date_pair.mask_length := _bit_mask_lenght;
					ELSE
						IF _start_date < previous_bounds.start_date THEN
							_start_bitmask_date := _start_date;
							_tmp_bitmask := (lpad('',previous_bounds.start_date - _start_bitmask_date,'0'))::bit varying;
							_previous_bit_mask_trimed := _tmp_bitmask || previous_bounds.bit_mask;
							_new_bit_mask_trimed := _bit_mask;
						ELSE
							_start_bitmask_date := previous_bounds.start_date;
							_tmp_bitmask := (lpad('',_start_date - _start_bitmask_date,'0'))::bit varying;
