fix exitCode when tests fail