Clean up and fix for variable name change