Fix missing variable error in test run