Fix jQuery event handler