Fixed a potential issue with jQuery >= 1.9