Fix pointer type incompatibility