Fix variable names & assignments