Fixed various variable issues.