Fix a bug where the content of variables are appended instead of being