 		     (setq col2  (elt  reg 3))
 		     (setq funcall (elt reg 4))
 		     (setq fundef (elt reg 5))
-		     (highlight-region line1 (- col1 1) line2  col2 buffer)
+		     (highlight-region line1 col1 line2  col2 buffer)
 		     (if (yes-or-no-p "Would you like to fold this expression? ")
 			 (progn (erl-spawn (erl-send-rpc node 'refac_fold_expression
-							 'fold_expression_1(list current-file-name line1 col1 line2 col2 funcall fundef erlang-refac-search-paths))
+							 'fold_expression_1(list current-file-name line1 col1 line2 col2 funcall fundef erlang-refac-search-paths tab-width))
 				  (erl-receive (node buffer highlight-region-overlay current-file-name)
 				      ((['rex ['badrpc rsn]]
 					(delete-overlay highlight-region-overlay)

	      (setq changed (cons (buffer-name b) changed)))))
      (if changed (message-box (format "there are modified buffers: %s" changed))
    (erl-spawn
      (erl-send-rpc node 'wrangler_distel 'rename_mod (list current-file-name name erlang-refac-search-paths))
      (erl-receive (buffer name)
	  ((['rex ['badrpc rsn]]
	    (message "Refactoring failed: %S" rsn))

			    (if (yes-or-no-p "Do you want to continue the refactoring?")
				(erl-spawn
				  (erl-send-rpc node 'refac_register_pid 'register_pid_2
						(list current-file-name start-line-no start-col-no end-line-no (- end-col-no 1) name erlang-refac-search-paths tab-width))
				  (erl-receive (buffer)
				      ((['rex ['badrpc rsn]]
					(message "Refactoring failed: %S" rsn))
