Fix jquery compatibility issue