fixed bug introduced by pull request #21
Merge pull request #22 from coen-hyde/fix-inarray-bug

Fixed bug introduced by pull request #21