corrected var references