Fix names of variables on writing.