fix typo resulting in hasError always being array