Fixed jQuery not adding event handlers when it should.