fix for validating arrays