Fix #198

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

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