Added condition to -invoke that arguments must be set