fix wrong number of arguments error when calling lambda