Fix incompatible pointer conversion