Fixed missing semicolons and invalid variable names