fixed empty array evaluating to true