patch by François Revol <revol at free dot fr>