bug fix for toBeArrayOfSize