Fix undefined data issue.