Fix #307 and Fix #308

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

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