fixing compatibility to the new version of jQuery