Fix some bugs through changes in jQuery 10.2