Fix type casting compilation warning.