fixed global leak in ajax