fix pointer casting issue.