Workaround a jQuery bug