Fixed warning for pointer cast