Fix helper and make variables configurable

Signed-off-by: kfei <kfei@kfei.net>