Hello,

please see this simple patch.  The bug was found by Paul Wayper.

Thanks!