fix for not returning with non-zero exit code if the last test case was failing