fix broken jquery plugin