Corrects an error with a trailing comma in several variables