Bugfixes to casting and varargs.