fixed the polymorphism function calculation

Signed-off-by: FARHAT <agwaeten@live.com>