Fix compatibiliy with jQuery