Fixes PInvoke Stack Imbalance bug