Fix incompatible pointer types