Fixed exit status in tests