Fixed crashing issue.