Fix string comparison and variable naming.
Fix variable names in the other versions.