corrected variable visibility.