Fix XSS bug + better rendering