Fixed overwritten javascript code