minor js changes in template