small debug and js changes

small debug and js changes