patch from Carlos Canau <Carlos@Canau.COM>