Fixed crashes.
Merge pull request #17 from ko2fan/3.6.0

Fixed crashes.