fix for latest jQuery compatibility