more p/invoke corrections