some small bugs fixed

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