add missing comma, fix missing variable names