bug reported by Tomasz Pawlik

Signed-off-by: Joseph Rézeau <moodle@rezeau.org>