crash while creating index bug fix.
Merge pull request #6 from tanaydin/master

crash while index creation bugfix.