Fixed compile error
Merge pull request #916 from lodle/crashfix5

Fixed compile error