Correct P/Invoke mistakes