Fixes incorrect variable name by removing uneeded strings