Fix #1

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

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