removed buggy js code