fix parameter count check

Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>
fix functions

Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>