various small bugs correction

Signed-off-by: loopasam <samuel.croset@gmail.com>