Error repairs

repairing arguments order + added assert functions for quick test

Signed-off-by: Tomas Michalek <tomas.michalek@gatema.cz>