Fixed bugs on grammar and on name update for the devices