Clean up all the possible invalid variables.