Fix issue with JQuery 1.9+