fix hasErrors computation