Bug fixes to jQuery page