fixing jquery bugs