Fix for #336  The getStatusIndex returns an integer which can be null.  But was storing in an int, which cannot.
Merge pull request #337 from BlythMeister/#336

Fix for #336