fixed a bug with jquery 2