fixed pjax javascript parsing error and some other changes