Change on new version for compatibility with jquery >= 1.9