testing array before use to prevent bug like seems happen in #98
( can't reproduce )