avoid 0 length array