small code change in layout javascript code