fix wrong argument order and npe errors