Bug fix, test for array