Fix #8 fix #9

Signed-off-by: Emmanuel Tabard <e.tabard@gmail.com>