Fix for new jQuery versions