fixed crashing issue.