Fix argument order for the various invoke*().
Fix handling of longs and doubles.