changes that solved JS issue