some minor bug fix

Signed-off-by: Roger Manich <roger.manich@gmail.com>