fix a crash when calling invokeVoid* methods.