Handle validation for arrays. Fixed #8