fix incompatible pointer types