Error check array sizes