Fix for #259 (from JW)