fixed some bugs with jquery