Fix #349

Reproduce #349 and fix it.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>