Fixed typo
Extracted temporary value  variables.