Fix crashing issue.