Fixed an issue where success was being referenced before assigned in some tests