polymorphism bug

Signed-off-by: Emmanuel Mathot <emmanuel.mahot@gmail.com>