fix "TypeError: Cannot read property 'failures' of undefined"