Please find attached patches to fix a bug reported to the Debian BTS http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=678012 by Salvatore Bonaccorso (thanks!).