Fix NullPointException

Signed-off-by: Sebastien MICHEL <michoux@gmail.com>