fixed js issues
Merge branch 'debug'