Corrected variable issues