Corrected error in passing variables.