fixed jquery
fixed bug with queries not working half the time