Fixed wrong variable name in test's for loop