Fixed a memory issue with our javascript code.